import Vue from 'vue'
import App from './App.vue'
import './registerServiceWorker'
import router from './router'
import store from './store'


//安装并引用element-ui ： npm i element-ui -S
import element from 'element-ui'
import 'element-ui/lib/theme-chalk/index.css'
Vue.use(element)

//安装并引用axios ： npm i axios -S
import axios from 'axios'

// //拦截器（为每个请求在头部添加token）
// axios.interceptors.request.use(config=>{
//   var token = localStorage.getItem('token')
//   config.headers.Authorization = 'Bearer '+ token
//   return config
// })

Vue.prototype.$http = axios
Vue.prototype.$baseUrl='http://localhost:5218/' //基本的url



//安装并引用echarts ：npm i echarts -S  或 npm install echarts --save
//在统计分析中用到图表(views/analysis 文件夹中)
import * as echarts from 'echarts'
Vue.prototype.$echarts = echarts

Vue.config.productionTip = false

new Vue({
  router,
  store,
  render: h => h(App)
}).$mount('#app')
